package top.suven.base.http.enums;

/**
 * @ClassName: GoodsTypeEnum
 * @Description: TODO
 * @Author xiexiaodong
 * @Date 2018/6/26 19:57
 * @Copyright: (c) 2018 gc by https://www.gc.com.cn/
 * @Version : 1.0.0
 */
public enum GoodsTypeEnum {
    VIP(0,"VIP套餐"),
    EXPERIENCE_VIP(1,"体验VIP套餐"),
    SVIP(2,"超级VIP套餐"),
    WALLET_RECHARGE(3,"钱包充值套餐"),
    GVIP(4,"GVIP套餐");

    private int value;
    private String name;

    GoodsTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }
    public String getName() {
        return name;
    }
    public static GoodsTypeEnum getByValue(int value) {
        for(GoodsTypeEnum goodsTypeEnum : GoodsTypeEnum.values()) {
            if(goodsTypeEnum.value == value) {
                return goodsTypeEnum;
            }
        }
        throw new IllegalArgumentException("No element matches " + value);
    }
}
